/********************************************/
  // Creation History
  // --------------------------------------------------------------
  //	Company:			HTHK
  //	NAME:				Job.java
  //    Title   :			Reflect the Job Data Table
  //	FUNCTION:
  //	BY:					Jet Tao
  //	DATE:				09/12/2003
  // --------------------------------------------------------------
/*********************************************/

package tss.job;

import com.ffpc.sql.*;

import tss.job.JobBean;

public class Job
   extends DataObject
   implements JobBean
{
   private String job_name = null;
   private String comments = null;
   private String create_date = null;
   private String create_by = null;
   private String upd_date = null;
   private String upd_by = null;
   private Column ColJobName = null;
   private Column ColComments = null;
   private Column ColCreateDate = null;
   private Column ColCreateBy = null;
   private Column ColUpdDate = null;
   private Column ColUpdBy = null;
   /**
    * Constructor
    */
   public Job()
   {
       ColJobName = new Column(0,"job_name",Column.Types.string,null,20,false);
       ColComments = new Column(1,"comments",Column.Types.string,null,255,true);
       ColCreateDate = new Column(2,"create_date",Column.Types.time,null,7,false);
       ColCreateBy = new Column(3,"create_by",Column.Types.string,null,10,false);
       ColUpdDate = new Column(4,"upd_date",Column.Types.time,null,7,true);
       ColUpdBy = new Column(5,"upd_by",Column.Types.string,null,10,true);
   }

   // functions belongs to JobBean interface

   @Override
public void setJob_name(String job_name)
   {       this.job_name = this.setAttribute(ColJobName,job_name);
   }

   @Override
public String getJob_name()
   {       return this.job_name==null?"":this.job_name;
   }

   @Override
public void setComments(String comments)
   {       this.comments = this.setAttribute(ColComments,comments);
   }

   @Override
public String getComments()
   {       return this.comments==null?"":this.comments;
   }

   @Override
public void setCreate_date(String create_date)
   {       this.create_date = this.setAttribute(ColCreateDate,create_date);
   }

   @Override
public String getCreate_date()
   {       return this.create_date==null?"":this.create_date;
   }

   @Override
public void setCreate_by(String create_by)
   {       this.create_by = this.setAttribute(ColCreateBy,create_by);
   }

   @Override
public String getCreate_by()
   {       return this.create_by==null?"":this.create_by;
   }

   @Override
public void setUpd_date(String upd_date)
   {       this.upd_date = this.setAttribute(ColUpdDate,upd_date);
   }

   @Override
public String getUpd_date()
   {       return this.upd_date==null?"":this.upd_date;
   }

   @Override
public void setUpd_by(String upd_by)
   {       this.upd_by = this.setAttribute(ColUpdBy,upd_by);
   }

   @Override
public String getUpd_by()
   {       return this.upd_by==null?"":this.upd_by;
   }

   // belongs to row interface

   @Override
public Column[] createColumns()
   {
       Column[] cols = new Column[6];
       cols[0] = ColJobName.clone(null);
       cols[1] = ColComments.clone(null);
       cols[2] = ColCreateDate.clone(null);
       cols[3] = ColCreateBy.clone(null);
       cols[4] = ColUpdDate.clone(null);
       cols[5] = ColUpdBy.clone(null);
       return cols;
   }

   // super's abstract methods

   @Override
public String getTableName()
   {
       return "tss.tss_c_job";
   }

   @Override
protected String[] getKeyColumnNames()
   {
       String[] list = {
                         "job_name"
                       };
       return list;
   }

   @Override
protected String[] getUpdatableColumnNames()
   {
       String[] list = {
                         "comments"
                         ,"create_date"
                         ,"create_by"
                         ,"upd_date"
                         ,"upd_by"
                       };
       return list;
   }

   @Override
protected void retrieveColumnValues()
   {
       this.job_name = this.retrieveColumnValue("job_name");
       this.comments = this.retrieveColumnValue("comments");
       this.create_date = this.retrieveColumnValue("create_date");
       this.create_by = this.retrieveColumnValue("create_by");
       this.upd_date = this.retrieveColumnValue("upd_date");
       this.upd_by = this.retrieveColumnValue("upd_by");
   }
}

